package com.alon.spring01.common.interceptor;

import com.alon.spring01.common.dataSource.DynamicPlugin;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * @program: spring01
 * @description: 拦截器配置
 * @author: yulongguang
 * @create: 2019-07-17 11:34
 **/
@Configuration
public class InterceptorConfig implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new ManualInterceptor());
//        registry.addInterceptor((HandlerInterceptor) new DynamicPlugin());
    }
}
